package edu.bailie.springmvc.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class HelloController {


	/***
	 * http://www.baidu.com/search?kw="培黎的c语言之父是谁"
	 * http://www.baidu.com/search/1/233/4556
	 */

	@RequestMapping(value = "/test/{id}",method = RequestMethod.GET)
	public String testRestFul(
		@PathVariable("id") Integer id
	){
		System.out.println(id);
		return "ok";
	}



	@RequestMapping(value = "/user/{id}", method = RequestMethod.GET)
	public String getById(@PathVariable("id") Integer id){
		System.out.println("根据用户id查询用户信息，用户id是" + id);
		return "ok";
	}


}
